<template>
  <div class="thumb">
    <div class="item-box">
      <a class="img-box" href="JavaScript:;">
        <ImgLazy :url="data.imgsrc" />
      </a>
      <span class="item-play">
        <PlayButton
          :duration="500"
          :width="'64px'"
          :height="'64px'"
        ></PlayButton>
      </span>
      <div class="palyCnt">
        <i class="iconfont icon-erji"></i>
        {{ data.playCnt }}
      </div>
    </div>
    <div class="item-info">
      <a class="item-title" href="JavaScript:;">{{ data.text }}</a>
    </div>
  </div>
</template>

<script>
export default {
  name: "Item",
  components: {},
  props: {
    data: Object,
  },
};
</script>

<style lang="scss" scoped>
.thumb {
  margin: 0 16px 24px;
  .item-box {
    position: relative;
    display: block;
    overflow: hidden;
    z-index: 1;

    &::after {
      content: "";
      display: block;
      width: 100%;
      padding-bottom: 100%;
    }

    &:hover {
      .item-play {
        display: block;
      }
    }
    .item-play {
      display: none;
    }
    .palyCnt {
      position: absolute;
      top: 10px;
      right: 5px;
      padding: 0 8px;
      line-height: 24px;
      color: #fff;
      border-radius: 12px;
      text-align: center;
      background: rgba(0, 0, 0, 0.4);
      font-size: 12px;
      z-index: 1;
    }
  }
  .item-info {
    .item-title {
      display: block;
      margin-top: 15px;
      line-height: 18px;
      color: #666;
    }
  }
}
</style>